<?php

/**
 * 系统设置
 * @copyright Copyright &copy; 2011, MAOJIAN
 * @author maojianlw@139.com
 * @since 1.0 - 2011-8-22
 */

class Setting extends Authentication{

    public function indexAction(){
    	$this->display();
    }
    
    
    /**
     * 更新表映射
     */
    public function updateTableMappendAction(){
    	$dbs = import('Config.DbConfig', false);
    	if(is_array($dbs)){
    		foreach($dbs as $db_data){
    			Relation::entityMappend($db_data['dbname']);
    		}
    		$this->ajaxReturn(200, '更新表映射成功!');
    	}else{
    		$this->ajaxReturn(300, '更新表映射成功!');
    	}
    	
    	
    }
    
}
?>